package practicedemo44;

public class F_Word_Test {
    public static void main(String[] args) {
        String arr1 = "艹测试";
        String arr2 = "fuck测试";
        String arr3 = "妈测试";
        String arr4 = "tmd测试";

        System.out.println(F_Word_Dictionary(arr1));
        System.out.println(F_Word_Dictionary(arr2));
        System.out.println(F_Word_Dictionary(arr3));
        System.out.println(F_Word_Dictionary(arr4));
    }

    public static String F_Word_Dictionary(String arr) {
        String[] F_Dictionary = new String[]{"fuck", "tmd", "艹", "妈"};
        for (int i = 0; i < F_Dictionary.length; i++) {
            arr = arr.replace(F_Dictionary[i], "***");
        }
        return arr;
    }
}
